import Vue from 'vue'
import VueRouter from 'vue-router'
import CampusBinhaiView from '../views/CampusBinhaiView.vue'
import CampusChashanView from '../views/CampusChashanView.vue'
import CampusYueqingView from '../views/CampusYueqingView.vue'
import LoginView from '../views/LoginView.vue'
import StudentSystemView from '../views/StudentSystemView.vue'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: CampusBinhaiView
  },
  {
    path: '/chashan',
    name: 'chashan',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/CampusChashanView.vue')
    }
  },
  {
    path: '/yueqing',
    name: 'yueqing',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/CampusYueqingView.vue')
    }
  },
  {
    path: '/login',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/LoginView.vue')
    }
  },
  {
    path: '/student',
    name: 'student',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/StudentSystemView.vue')
    }
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
